#include <iostream>
#include <cstring>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <set>
#include <bitset>
#include <utility>
using namespace std;

#define mm(a, n) memset(a, n, sizeof a)
#define mk(a, b) make_pair(a, b)

const double eps = 1e-6;
const int INF = 0x3f3f3f3f;

typedef long long LL;
typedef unsigned long long ULL;
typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;
typedef pair<int, LL> PIL;

inline void quickread() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
}



inline void solution() {
    string s;
    getline(cin, s);
    int N = s.size(), k, col;
    for (col = 3; col <= N; col ++ ) {
        if ((N + 2 - col) % 2) continue;
        k = (N + 2 - col) / 2;
        if (k <= col) break;
    }
    int l, r;
    for (l = 0, r = N - 1; l < k - 1; l ++, r -- ) {
        string res_line;
        res_line += s[l];
        for (int i = 1; i <= col - 2; i ++) res_line += " ";
        res_line += s[r];
        cout << res_line << endl;
    }
    for (int i = l; i < l + col; i ++) {
        cout << s[i];
    }
    cout << endl;

    return ;
}

int main() {
    freopen("input.txt", "r", stdin);
    quickread();
    solution();
    return 0;
}